<template>
  <div>
    <h2>one</h2>
    <h3>keepalive</h3>
    <span
      >用户缓存组件的 用法就是包裹router-view标签或者是component标签
      它自身有一些属性。比方说 <br />
      include 要缓存哪一些;<br />
      exclude 不缓存那一些<br />
      max 最多缓存多少个<br />
      当组件被缓存。第一次会执行所有的生命周期以及actived激活状态生命周期
      组件离开会执行。deactivated失去激活状态生命周期,下次再进入缓存的组件.只执行.actived激活状态生命周期</span
    >
  </div>
</template>

<script>
export default {
  name: "One",
  components: {},
  props: {},
  data() {
    return {};
  },
  computed: {},
  created() {
    console.log("one的created");
  },
  activated() {
    console.log("one的activated激活");
  },
  deactivated() {
    console.log("one的deactivated失去激活");
  },
  destroyed() {
    console.log("one的destroyed销毁");
  },
  mounted() {},
  methods: {},
};
</script>
<style scoped></style>
